package com.ljy.jymail.seckill.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class HelloSchedule {

    /*
    * @Scheduled：输入cron表达式
    * 1-spring中只允许6为cron表达式，不允许第七位的年
    * 2-一般情况下，定时任务不应该阻塞
    * */
    @Async
    @Scheduled(cron = "0-30 * * * * 6,7,5,4,1")
    public void hello(){

    }
}
